<%-- 
    Document   : JavaChat
    Created on : Dec 21, 2008, 7:09:28 AM
    Author     : jio
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <script type='text/javascript' src='../dwr/engine.js'> </script>
        <script type='text/javascript' src='../dwr/interface/JavaChat.js'> </script>
        <script type='text/javascript' src='../dwr/util.js'> </script>

    </head>

    <body onload="dwr.engine.setActiveReverseAjax(true);">

        <script type="text/javascript">
            function sendMessage() {
                JavaChat.addMessage(dwr.util.getValue("name") + ': ' + dwr.util.getValue("text"));
            }
        </script>


        <h1>Java Chat</h1>

        <p>This is a very simple chat demo that uses reverse ajax
            to collect messages and server-side browser manipulation to
        update the pages with the results.</p>

        <p>
            <input id="name" type="text" name="user" value="" />
            Your Message:
            <input id="text" onkeypress="dwr.util.onReturn(event, sendMessage);"/>
            <input type="button" value="Send" onclick="sendMessage();"/>
        </p>
        <hr/>

        <ul id="chatlog" style="list-style-type:none;">
        </ul>

    </body>
</html>
